package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(EmployeeQueryObject qo);


    void saveRelation(@Param("empId") Long empId, @Param("roleIds") Long[] roleIds);

    void deleteRelation(Long employeeId);

    Employee checkUsername(String username);

    Employee selectByUsername(String username);
}